package ooday05homework;

public class EnumTest {
    public static void main(String[] args) {
        Seasons[] s = Seasons.values();//获取所有枚举对象
        for (Seasons seasons : s) {
            System.out.println(seasons);
        }
        Seasons s1 = Seasons.WINTER;//WINTER对象
        switch (s1) {
            case SPRING:
                System.out.println("春天");
                break;
            case SUMMER:
                System.out.println("夏天");
                break;
            case AUTUMN:
                System.out.println("秋天");
                break;
            case WINTER:
                System.out.println("冬天");
                break;
        }
    }
}
